<template>
  <div style="page-break-before: always;">
    <div v-if="docClassId==33">
      <div class="week">
        <div>
          <h4 class="first-level-title" ref="p0id0" style="text-align: center;width: 100%;"
            v-html="weekTitle"></h4>
          <table border="1" bordercolor="#000000" style="vertical-align:middle;width: 100%;border-collapse: collapse"
            class="table">
            <tbody>
              <tr style="">
                <td style="vertical-align: middle;" rowspan="2" class="second-level-title">
                  本<br />周<br />训<br />练<br />任<br />务
                </td>
                <td class="second-level-title" ref="p0id1" style="text-align: left;vertical-align: middle" rowspan="2">
                </td>
                <td class="second-level-title">训练<br />总时</td>
                <td class="second-level-title" style="vertical-align: middle;text-align: left;" colspan="2">
                  <span style="display: inline-block;">
                    <span style="text-align: left;" ref="p0id2"></span>
                  </span>
                </td>
              </tr>
              <tr style="height: 2%">
                <td style="width:8%;vertical-align: middle" class="second-level-title">训练<br />内容<br />比重
                </td>
                <td style="width:20px;" colspan="2">
                  <p style="text-align: left;">一般素质<span style="text-align: left;" ref="p0id3"></span>(%)
                  </p>
                  <p style="text-align: left;">专项素质<span style="text-align: left;" ref="p0id4"></span><span
                      style="text-align: left;"></span>(%)</p>
                  <p style="text-align: left;">技, 战术<span style="text-align: left;" ref="p0id5"></span><span
                      style="text-align: left;"></span>(%)</p>
                  <p style="text-align: left;">其他内容<span style="text-align: left;" ref="p0id6"></span><span
                      style="text-align: left;"></span>(%)</p>
                </td>
              </tr>
              <!-- <tr>
              </tr>
              <tr>
              </tr>
              <tr>
              </tr> -->
              <tr style="height: 10%">
                <td style="width: 1%;height: 50px;" class="second-level-title">星<br />期</td>
                <td style="width: 48%" class="second-level-title">训练内容<br />(早操或上午训练)</td>
                <td colspan="2" style="width: 48%" class="second-level-title">训练内容<br />(下午或晚上训练)</td>
                <td style="width: 3%" class="second-level-title">负<br />荷</td>
              </tr>
              <tr style="height: 10%">
                <td style=" vertical-align:middle;height: 50px;" class="second-level-title">一</td>
                <td style=" vertical-align:middle;" ref="p0id7"></td>
                <td colspan="2" style=" vertical-align:middle;" ref="p0id8"></td>
                <td style=" text-align:center; vertical-align:middle;" ref="p0id9"></td>
              </tr>
              <tr style="height: 10%">
                <td style=" vertical-align:middle;height: 50px;" class="second-level-title">二</td>
                <td style=" vertical-align:middle;" ref="p0id10"></td>
                <td colspan="2" style=" vertical-align:middle;" ref="p0id11"></td>
                <td style=" text-align:center; vertical-align:middle;" ref="p0id12"></td>
              </tr>
              <tr style="height: 10%">
                <td style=" vertical-align:middle;height: 50px;" class="second-level-title">三</td>
                <td style=" vertical-align:middle;" ref="p0id13"></td>
                <td colspan="2" style=" vertical-align:middle;" ref="p0id14"></td>
                <td style=" text-align:center; vertical-align:middle;" ref="p0id15"></td>
              </tr>
              <tr style="height: 10%">
                <td style=" vertical-align:middle;height: 50px;" class="second-level-title">四</td>
                <td style=" vertical-align:middle;" ref="p0id16"></td>
                <td colspan="2" style=" vertical-align:middle;" ref="p0id17"></td>
                <td style=" text-align:center; vertical-align:middle;" ref="p0id18"></td>
              </tr>
              <tr style="height: 10%">
                <td style=" vertical-align:middle;height: 50px;" class="second-level-title">五</td>
                <td style=" vertical-align:middle;" ref="p0id19"></td>
                <td colspan="2" style=" vertical-align:middle;" ref="p0id20"></td>
                <td style=" text-align:center; vertical-align:middle;" ref="p0id21"></td>
              </tr>
              <tr style="height: 10%">
                <td style=" vertical-align:middle;height: 50px;" class="second-level-title">六</td>
                <td style=" vertical-align:middle;" ref="p0id22"></td>
                <td colspan="2" style=" vertical-align:middle;" ref="p0id23"></td>
                <td style=" text-align:center; vertical-align:middle;" ref="p0id24"></td>
              </tr>
              <tr style="height: 10%">
                <td style=" vertical-align:middle;height: 50px;" class="second-level-title">日</td>
                <td style=" vertical-align:middle;" ref="p0id25"></td>
                <td colspan="2" style=" vertical-align:middle;" ref="p0id26"></td>
                <td style="text-align:center; vertical-align:middle;" ref="p0id27"></td>
              </tr>


            </tbody>
          </table>
        </div>
      </div>
      <div class="next-page" style="page-break-after: always;"></div>
      <div class="week">
        <div>
          <h4 class="first-level-title" ref="p1id0" style="text-align: center;width: 100%;"
            v-html="classTitle"></h4>
          <table border="1" bordercolor="#000000" class="table "
            style="width: 100%;border-collapse: collapse;text-align: center;">
            <tbody>
              <tr>
                <td style="vertical-align: middle" rowspan="4" class="second-level-title force-width">
                  课<br />的<br />任<br />务
                </td>
                <td ref="p1id1" style="text-align: left;vertical-align: middle;" rowspan="4">
                </td>
                <td style="width: 20%;vertical-align: middle;text-align:center;height: 50px;"
                  class="second-level-title">训练用时</td>
                <td style="width: 20%;vertical-align: middle;text-align: center"><span ref="p1id2"></span>
                </td>
              </tr>

              <tr>


                <td style="width:20%;text-align:center ;vertical-align: middle;height: 50px;"
                  class="second-level-title">训练地点
                </td>
                <td ref="p1id3" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>
              <tr>
                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">负荷量</td>
                <td ref="p1id4" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>
              <tr>
                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">负荷强度</td>
                <td ref="p1id5" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>


              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">准<br />备<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p1id6" colspan="3"></td>
              </tr>

              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">基<br />本<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p1id7" colspan="3"></td>
              </tr>
              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">结<br />束<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p1id8" colspan="3"></td>
              </tr>
              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">课<br />后<br />小<br />结</td>
                <td style="text-align: left;vertical-align: middle" ref="p1id9" colspan="3"></td>
              </tr>

            </tbody>
          </table>
        </div>
      </div>
      <div class="next-page" style="page-break-after: always;"></div>
      <div class="week">
        <div>
          <h4 class="first-level-title" style="text-align: center;width: 100%;" ref="p2id0"></h4>
          <table border="1" bordercolor="#000000" class="table "
            style="width: 100%;border-collapse: collapse;text-align: center;">
            <tbody>
              <tr>
                <td style="vertical-align: middle" rowspan="4" class="second-level-title force-width ">
                  课<br />的<br />任<br />务
                </td>
                <td ref="p2id1" style="vertical-align: middle;text-align: left" rowspan="4">
                </td>
                <td style="width: 20%;text-align:center;height: 50px;" class="second-level-title">训练用时</td>
                <td ref="p2id2" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>

              <tr>


                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">训练地点
                </td>
                <td ref="p2id3" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>
              <tr>
                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">负荷量</td>
                <td ref="p2id4" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>
              <tr>
                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">负荷强度</td>
                <td ref="p2id5" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>


              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">准<br />备<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p2id6" colspan="3"></td>
              </tr>

              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">基<br />本<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p2id7" colspan="3"></td>
              </tr>
              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">结<br />束<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p2id8" colspan="3"></td>
              </tr>
              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">课<br />后<br />小<br />结</td>
                <td style="text-align: left;vertical-align: middle" ref="p2id9" colspan="3"></td>
              </tr>

            </tbody>
          </table>
        </div>
      </div>
      <div class="next-page" style="page-break-after: always;"></div>
      <div class="week">
        <div>
          <h4 class="first-level-title" style="text-align: center;width: 100%;" ref="p3id0"></h4>
          <table border="1" bordercolor="#000000" class="table "
            style="width: 100%;border-collapse: collapse;text-align: center;">
            <tbody>
              <tr>
                <td style="vertical-align: middle" rowspan="4" class="second-level-title force-width">
                  课<br />的<br />任<br />务
                </td>
                <td ref="p3id1" style="vertical-align: middle;text-align: left" rowspan="4">
                </td>
                <td style="width: 20%;text-align:center;height: 50px;" class="second-level-title">训练用时</td>
                <td ref="p3id2" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>

              <tr>


                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">训练地点
                </td>
                <td ref="p3id3" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>
              <tr>
                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">负荷量</td>
                <td ref="p3id4" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>
              <tr>
                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">负荷强度</td>
                <td ref="p3id5" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>


              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">准<br />备<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p3id6" colspan="3"></td>
              </tr>

              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">基<br />本<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p3id7" colspan="3"></td>
              </tr>
              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">结<br />束<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p3id8" colspan="3"></td>
              </tr>
              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">课<br />后<br />小<br />结</td>
                <td style="text-align: left;vertical-align: middle" ref="p3id9" colspan="3"></td>
              </tr>

            </tbody>
          </table>
        </div>
      </div>
      <div class="next-page" style="page-break-after: always;"></div>
      <div class="week">
        <div>
          <h4 class="first-level-title" style="text-align: center;width: 100%;" ref="p4id0"></h4>
          <table border="1" bordercolor="#000000" class="table "
            style="width: 100%;border-collapse: collapse;text-align: center;">
            <tbody>
              <tr>
                <td style="vertical-align: middle" rowspan="4" class="second-level-title force-width">
                  课<br />的<br />任<br />务
                </td>
                <td ref="p4id1" style="vertical-align: middle;text-align: left" rowspan="4">
                </td>
                <td style="width: 20%;text-align:center;height: 50px;" class="second-level-title">训练用时</td>
                <td ref="p4id2" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>

              <tr>


                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">训练地点
                </td>
                <td ref="p4id3" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>
              <tr>
                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">负荷量</td>
                <td ref="p4id4" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>
              <tr>
                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">负荷强度</td>
                <td ref="p4id5" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>


              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">准<br />备<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p4id6" colspan="3"></td>
              </tr>

              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">基<br />本<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p4id7" colspan="3"></td>
              </tr>
              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">结<br />束<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p4id8" colspan="3"></td>
              </tr>
              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">课<br />后<br />小<br />结</td>
                <td style="text-align: left;vertical-align: middle" ref="p4id9" colspan="3"></td>
              </tr>

            </tbody>
          </table>
        </div>
      </div>
      <div class="next-page" style="page-break-after: always;"></div>
      <div class="week">
        <div>
          <h4 class="first-level-title" style="text-align: center;width: 100%;" ref="p5id0"></h4>
          <table border="1" bordercolor="#000000" class="table "
            style="width: 100%;border-collapse: collapse;text-align: center;">
            <tbody>
              <tr>
                <td style="vertical-align: middle" rowspan="4" class="second-level-title force-width">
                  课<br />的<br />任<br />务
                </td>
                <td ref="p5id1" style="vertical-align: middle;text-align: left" rowspan="4">
                </td>
                <td style="width: 20%;text-align:center;height: 50px;" class="second-level-title">训练用时</td>
                <td ref="p5id2" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>

              <tr>


                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">训练地点
                </td>
                <td ref="p5id3" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>
              <tr>
                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">负荷量</td>
                <td ref="p5id4" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>
              <tr>
                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">负荷强度</td>
                <td ref="p5id5" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>


              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">准<br />备<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p5id6" colspan="3"></td>
              </tr>

              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">基<br />本<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p5id7" colspan="3"></td>
              </tr>
              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">结<br />束<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p5id8" colspan="3"></td>
              </tr>
              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">课<br />后<br />小<br />结</td>
                <td style="text-align: left;vertical-align: middle" ref="p5id9" colspan="3"></td>
              </tr>

            </tbody>
          </table>
        </div>
      </div>
      <div class="next-page" style="page-break-after: always;"></div>
      <div class="week">
        <div>
          <h4 class="first-level-title" style="text-align: center;width: 100%;" ref="p6id0"></h4>
          <table border="1" bordercolor="#000000" class="table "
            style="width: 100%;border-collapse: collapse;text-align: center;">
            <tbody>
              <tr style="max-height: 80px">
                <td style="vertical-align: middle" rowspan="4" class="second-level-title force-width">
                  课<br />的<br />任<br />务
                </td>
                <td ref="p6id1" style="vertical-align: middle;text-align: left" rowspan="4">
                </td>
                <td style="width: 20%;text-align:center;height: 50px;" class="second-level-title">训练用时</td>
                <td ref="p6id2" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>

              <tr>


                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">训练地点
                </td>
                <td ref="p6id3" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>
              <tr>
                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">负荷量</td>
                <td ref="p6id4" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>
              <tr>
                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">负荷强度</td>
                <td ref="p6id5" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>


              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">准<br />备<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p6id6" colspan="3"></td>
              </tr>

              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">基<br />本<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p6id7" colspan="3"></td>
              </tr>
              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">结<br />束<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p6id8" colspan="3"></td>
              </tr>
              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">课<br />后<br />小<br />结</td>
                <td style="text-align: left;vertical-align: middle" ref="p6id9" colspan="3"></td>
              </tr>

            </tbody>
          </table>
        </div>
      </div>
      <div class="next-page" style="page-break-after: always;"></div>
      <div class="week">
        <div>
          <h4 class="first-level-title" style="text-align: center;width: 100%;" ref="p7id0"></h4>
          <table border="1" bordercolor="#000000" class="table "
            style="width: 100%;border-collapse: collapse;text-align: center;">
            <tbody>
              <tr style="max-height: 80px">
                <td style="vertical-align: middle" rowspan="4" class="second-level-title force-width">
                  课<br />的<br />任<br />务
                </td>
                <td ref="p7id1" style=" vertical-align: middle;text-align: left" rowspan="4">
                </td>
                <td style="width: 20%;text-align:center;height: 50px;" class="second-level-title">训练用时</td>
                <td ref="p7id2" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>

              <tr>


                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">训练地点
                </td>
                <td ref="p7id3" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>
              <tr>
                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">负荷量</td>
                <td ref="p7id4" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>
              <tr>
                <td style="width:20%;text-align:center;height: 50px;" class="second-level-title">负荷强度</td>
                <td ref="p7id5" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>


              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">准<br />备<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p7id6" colspan="3"></td>
              </tr>

              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">基<br />本<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p7id7" colspan="3"></td>
              </tr>
              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">结<br />束<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="p7id8" colspan="3"></td>
              </tr>
              <tr class="mt-none mb-sm  ">
                <td style="width: 10%" class="second-level-title">课<br />后<br />小<br />结</td>
                <td style="text-align: left;vertical-align: middle" ref="p7id9" colspan="3"></td>
              </tr>

            </tbody>
          </table>
        </div>
      </div>
    </div>
    <div v-else id="poster">
      <div>
        <header>
          <header>
            <div class="row" style="padding: 20rpx;">

              <div style="text-align: center;" ref="id0"></div>
              <div class="text-center " style="text-align: center;" ref="empInfo"></div>
              <div style="height: 30px;display: flex;justify-content: space-between;color: #000000;">
                <span ref="schoolName">{{this.previewData.schoolName[0].content}}</span>
                <span ref="dateRange">{{this.previewData.dateRange[0].content}}</span>
              </div>
            </div>
          </header>
        </header>
        <div class="table-responsive">
          <table class="table " style="width: 100%;border-collapse: collapse;text-align: center;">
            <tbody>
              <tr>
                <td style="vertical-align: middle;height: 200px;" rowspan="4" class="second-level-title force-width">
                  课<br />的<br />任<br />务
                </td>
                <td ref="id2" style="text-align: left;vertical-align: middle" rowspan="4">
                </td>
                <td style="width: 20%;vertical-align: middle;text-align:center" class="third-level-title">训练用时</td>
                <td ref="id3" colspan="2" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>

              <tr>


                <td style="width:20%;text-align:center ;vertical-align: middle" class="third-level-title">训练地点
                </td>
                <td ref="id4" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>
              <tr>
                <td style="width:20%;text-align:center" class="third-level-title">负荷量</td>
                <td ref="id5" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>
              <tr>
                <td style="width:20%;text-align:center" class="third-level-title">负荷强度</td>
                <td ref="id6" style="width: 20%;vertical-align: middle;text-align: center"></td>
              </tr>


              <tr class="mt-none mb-sm  ">
                <td style="width: 10%;height: 150px;" class="second-level-title">准<br />备<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="id7" colspan="3"></td>
              </tr>

              <tr class="mt-none mb-sm  ">
                <td style="width: 10%;height: 150px;" class="second-level-title">基<br />本<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="id8" colspan="3"></td>
              </tr>
              <tr class="mt-none mb-sm  ">
                <td style="width: 10%;height: 150px;" class="second-level-title">结<br />束<br />部<br />分</td>
                <td style="text-align: left;vertical-align: middle" ref="id9" colspan="3"></td>
              </tr>
              <tr class="mt-none mb-sm  ">
                <td style="width: 10%;height: 150px;" class="second-level-title">课<br />后<br />小<br />结</td>
                <td style="text-align: left;vertical-align: middle" ref="id10" colspan="3"></td>
              </tr>

            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>
  </div>
</template>

<script>
  export default {
    props: ['previewData', 'docClassId'],
    data() {
      return {
        weekTitle: '',
        classTitle: '',
        weekData: '',
        classData: '',
      }
    },
    mounted() {
      this.weekPreview()
    },
    watch: {
      previewData(newValue, oldValue) {
        setTimeout(() => {
          this.weekPreview()
        }, 300);
      }
    },
    methods: {
      weekPreview() {
        if(this.docClassId==33) {
          let count = 0;
          this.weekTitle = Object.keys(this.previewData)[0]
          this.classTitle = Object.keys(this.previewData)[1]
          for (var o in this.previewData) {
          	var selector = 'p' + count + 'id0';
          	this.$refs[selector].innerHTML = o
          	for (var i = 0; i < this.previewData[o].length; i++) {
          		var selector1 = 'p' + count + "id" + (i + 1);
          		this.$refs[selector1].innerHTML = this.reg_replace(this.previewData[o][i].content + this.previewData[o][i].val)
          	}
          	count++;
          }
          for (var i = 9; i <= 27; i += 3) {
          	var content = '';
          	let selector = 'p0id' + i
          	var a = this.$refs[selector].innerHTML
          	var arr = a.split('');
          	for (var j = 0; j < arr.length; j++) {
          		content += arr[j] + ""
          	}
          	this.$refs['p0id' + i].innerHTML = this.reg_replace(content)
          }
        }else{
          let count = 0;
          for (var o in this.previewData) {
          	if (o == 'empInfo' || o == 'schoolName' || o == 'dateRange') {
          		this.$refs[o].innerHTML = this.reg_replace(this.previewData[o][0].content)
              // 课时计划
              if(this.docClassId == 34){
                this.$refs[o].innerHTML = this.reg_replace(this.previewData[o][0].content.split('至')[0])
              }

          		if (this.previewData[o][0].docItemDataId == 0) continue;
          	} else {
          		this.$refs['id0'].innerHTML = o
          	}
          	count++;
          	for (var i = 0; i < this.previewData[o].length; i++) {
          		count++
          		var selector = "id" + count;
          		this.$refs[selector].innerHTML = this.reg_replace(this.previewData[o][i].content + this.previewData[o][i].val)
          	}
          }
        }
      },
      reg_replace(content) {
        content = content.replace(new RegExp("&nbsp;", "gm"), "");
        content = content.replace(new RegExp("<h1", "gm"), "<p");
        content = content.replace(new RegExp("<h2", "gm"), "<p");
        content = content.replace(new RegExp("<h3", "gm"), "<p");
        content = content.replace(new RegExp("<h4", "gm"), "<p");
        content = content.replace(new RegExp("<h5", "gm"), "<p");
        content = content.replace(new RegExp("<h6", "gm"), "<p");
        content = content.replace(new RegExp("<h7", "gm"), "<p");
        content = content.replace(new RegExp("<strong", "gm"), "<span");
        content = content.replace(new RegExp("<b ", "gm"), "<span ");
        content = content.replace(new RegExp("font-size", "gm"), "");
        content = content.replace(new RegExp("font-weight", "gm"), "");
        content = content.replace(new RegExp("font-weight", "gm"), "");
        content = content.replace(new RegExp('width="106%"', "gm"), '');
        content = content.replace(new RegExp('style', "gm"), '');
        return content
      },
    },
  }
</script>

<style scoped lang="scss">
</style>
